import { ADD_NUM } from './actionType';

const defaultState = {
    num: 0
};


export default (state = defaultState,action) => {
    let newState = JSON.parse(JSON.stringify(state));

    switch (action.type) {
        case ADD_NUM:
            newState.num += action.value;
            break;
        default:
            break;
    }

    return newState;
}